import { IEntity } from "@/components/Customer/index";
const CustomerStore = {
  namespaced: true,
  state: {
    loadingContent: false,
    loadingMenu: false,
    tabs: [],
    entities: [],
  },
  mutations: {
    setTabs: (state: any, tabs: object) => {
      state.tabs = tabs;
    },
    startLoadingContent(state: { loadingContent: boolean }) {
      state.loadingContent = true;
    },
    endLoadingContent(state: { loadingContent: boolean }) {
      state.loadingContent = false;
    },
    startLoadingMenu(state: { loadingMenu: boolean }) {
      state.loadingMenu = true;
    },
    endLoadingMenu(state: { loadingMenu: boolean }) {
      state.loadingMenu = false;
    },
    setEntities(state: { entities: IEntity[] }, entities: IEntity[]) {
      state.entities = entities;
    },
  },
};

export { CustomerStore };
